package com.dwxt.cdms.dao;

import com.dwxt.cdms.entity.AdminUser;
import com.dwxt.cdms.entity.AdminUserExample;
import com.dwxt.cdms.entity.Role;
import com.dwxt.cdms.entity.vo.AdminUserVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface AdminUserMapper {
    long countByExample(AdminUserExample example);

    int deleteByExample(AdminUserExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(AdminUser record);

    int insertSelective(AdminUser record);

    List<AdminUser> selectByExample(AdminUserExample example);

    AdminUser selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") AdminUser record, @Param("example") AdminUserExample example);

    int updateByExample(@Param("record") AdminUser record, @Param("example") AdminUserExample example);

    int updateByPrimaryKeySelective(AdminUser record);

    int updateByPrimaryKey(AdminUser record);

    List<AdminUserVO> selectAllUserVo(@Param("stationId") Integer stationId,
                                      @Param("name") String name,
                                      @Param("phone") String phone,
                                      @Param("currentUserId")Integer currentUserId );

    List<Role> selectRolesByUserId(String userId);

    List<AdminUserVO> selectResponsibleList(@Param("roleId") Integer roleId,@Param("stationId") Integer stationId);

}